
#ifndef __CE_SCENE_LODNODE_H__
#define __CE_SCENE_LODNODE_H__

#include <export.h>
#include <gfx/levelofdetail.h>
#include <scene/node.h>

/**
 * \addtogroup scene
 * @{
 */
/**
 * @brief Node grouping other nodes together, with onlye one getting rendered.
 */
class CE_API ceLODNode : public ceNode
{
private:
  ceLevelOfDetail<ceNode>  _nodes;

  ceNode*                     _node;
protected:
  virtual void FillPrivateBoundingBox (ceBoundingBox& bbox);
  virtual void UpdateTransformation ();

public:
  ceLODNode();

  ceLevelOfDetail<ceNode>& Get ();
  const ceLevelOfDetail<ceNode>& Get () const;

  ceNode* GetNode ();
  const ceNode* GetNode () const;

  virtual ceNodeType GetNodeType () const;

  virtual void Update (ceRenderEnvironment& env, iDevice* device);

  virtual void FindLights (ceSector* sector);
	virtual void ClearLights ();
	virtual void TestAndAddLight (ceLight* light);
};

#endif /* ! __CE_SCENE_LODNODE_H__ */

